const proxy = require('http-proxy-middleware')

module.exports = function(app) {

    app.use(proxy('/oauth',
        {
            "target": "http://localhost:8082/",
            "changeOrigin": true,
            "pathRewrite":{
                "^/oauth":"/oauth"
            }
        }))

    app.use(proxy('/userApi',
        {
            "target": "http://localhost:8083/",
            "changeOrigin": true,
            "pathRewrite":{
                "^/userApi":"/userApi"
            }
        }))
}
